import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  //系列删除
  delBySeriesProudctId: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/delete`, query),
  //智能分配
  smartAssign: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/asset-split`, query),
  //拆分确认
  splitConfirm: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/confirmSplit`, query),
  //查询产品信息
  queryProductList: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/find-product`, query),
  //查询未分配资产
  queryUnAssignAsset: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/unassigned`, query),
  //查询已分配资产
  queryAssignedAsset: (query) => api.get(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/find-product-allocation`, query),
  //试算
  tryCalc: (query) => api.post(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/split-check`, query),
  //确定保存
  confirmCalc: (query) => api.post(`${config.interfaces.type1}asset-split/asset-split-list-basic-info/manual-adjustment`, query),
  uploadFile: (query) => api.uploadFile(`${config.interfaces.type10}maat-server/api/v1/assetssplit/excelimport/upload`, {}, query.file),
  checkListCode: (query) => api.get(`${config.interfaces.type1}assetssplit/excelimport/checkListCode`, query),
  //拆分配置保存
  saveConfig: (query) => api.post(`${config.interfaces.type1}assetSplitConfig/saveConfig`, query),
  //拆分配置查询
  getConfig: (query) => api.get(`${config.interfaces.type1}assetSplitConfig/getConfig`, query),
};
